<?php

@include_once("connect.php");

$res = [];
$tell = $_POST['tellnumber'] ;


if($tell){
  $sql = "SELECT * FROM user_cart , goods_list WHERE tellnumber = '$tell' AND user_cart.goods_id = goods_list.goods_id" ;
  $a = mysqli_query($con , $sql);
  $list=[];
  while ($arr = mysqli_fetch_array($a)) {
    array_push($list, $arr);
  }
  if($list){
    $res['status'] = true ;
    $res['mag'] = '数据请求成功';
    $res['data'] = $list ;
  }else{
    $res['status']=false;
    $res['mag']="数据库有误";
  }

}else{
  $res['status']=false;
  $res['mag']="前端数据有误";
}
echo(json_encode($res,JSON_UNESCAPED_UNICODE));